<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="所有投资用户">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        投资用户可用余额总额：${total!0}<br/>
                                        资产管理公司用户可用余额总额：${fTotal!0}<br/>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">第一次投资时间：</div>
                                        <input class="_search-value" name="startDate" id="minFirstTenderDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="endDate" id="maxFirstTenderDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">注册时间：</div>
                                        <input class="_search-value" name="startDate" id="minRegisterDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="endDate" id="maxRegisterDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">最后一次投资时间：</div>
                                        <input class="_search-value" name="startDate" id="minLastTenderDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="endDate" id="maxLastTenderDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">总投资金额：</div>
                                        <input class="_search-value" name="minSumMoney" id="minSumMoney" value=""/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="maxSumMoney" id="maxSumMoney" value=""/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">总投资笔数：</div>
                                        <input class="_search-value" name="minTenderCount" id="minTenderCount" value=""/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="maxTenderCount" id="maxTenderCount" value=""/>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">用户名：</div>
                                        <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                        <div class="formTit">真实姓名：</div>
                                        <input type="text" name="realname" id="realname" value="请输入真实姓名" class="search-value">
                                        <div class="formTit">手机号码：</div>
                                        <input type="text" name="phone" id="phone" value="请输入手机号码" class="search-value">
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module search">
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>
                                </div>

                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名</td>
                                            <td>真实姓名</td>
                                            <td>手机号码</td>
                                            <td>总投资笔数</td>
                                            <td>总投资金额</td>
                                            <td>已投资金额</td>
                                            <td>可用余额</td>  
                                            <td>理财经理</td>
<!--                                             <td>账户详情</td> -->
											<td>注册时间</td>
											<td>第一次投资时间</td>
                                            <td>最后一次投资时间</td>
                                        </tr>
                                        <#if list?? && (list?size) gt 0 >
                                        	<#list list as item>
                                            <tr class="s">
                                                <td>${(item.userId!0)?c}</td>
                                                <td>${item.userName!''}</td>
                                                <td>${item.realName!''}</td>
                                                <td>${item.phone!''}</td>
                                                <td>${(item.count?c)!0}</td>
                                                <td>${(item.sumAccount?c)!0}</td>
                                                <td>${(item.tending)!0}</td>
                                                <td>${(item.balance?c)!0}</td>
                                                <td><@wealthManager id="${item.userId?c}"></@wealthManager></td>
<!--                                                 <td><a onclick='alertPop("账户信息","url:get?/admin/operate/viewAccountDetail.html?userId=${item.userId?c}",550,200,"true","","true","text");' href="javascript:void(0)">查看</a></td> -->
												<td>${(item.registerDate)}</td>
												<td>${(item.firstTenderTime)}</td>
                                                <td>${item.lastTenderTime!''}</td>
                                             </tr>
                                        	</#list>
                                         </#if>
                                    </table>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>
                                    
                               <div class="toolbor-module export">
			                 	<input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
			                  </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                               <script type="text/javascript">
                                    var url = 'allTenderUser.html?search=true';
                                    var xlsurl='allTenderUser.html?type=export';
                                    
                                    function sousuo(){
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                    	var realname = $("#realname").val();
                    					if(realname!=""&&realname!="请输入真实姓名"){
                    						sou += "&realname="+realname;
                    					}
//                     					var minMoney = $("#minMoney").val();
//                     					if(minMoney!=""){
//                     						sou += "&minMoney="+minMoney;
//                     					}
                    					
                      					var phone = $("#phone").val();
                      					if(phone!=""&&phone!="请输入手机号码"){
                    						sou += "&phone="+phone;
                    					}
                   					  	var minRegisterDate = $("#minRegisterDate").val();
                                    	var maxRegisterDate = $("#maxRegisterDate").val();
	                                    if (minRegisterDate!=''){
                                            sou += "&minRegisterDate="+minRegisterDate;
	                                    }
	                                    if (maxRegisterDate!=''){
	                                        sou += "&maxRegisterDate="+maxRegisterDate;
	                                    }
                                        var minFirstTenderDate = $("#minFirstTenderDate").val();
                                        var maxFirstTenderDate = $("#maxFirstTenderDate").val();
                                        if (minFirstTenderDate!=''){
                                            sou += "&minFirstTenderDate="+minFirstTenderDate;
                                        }
                                        if (maxFirstTenderDate!=''){
                                            sou += "&maxFirstTenderDate="+maxFirstTenderDate;
                                        }
                                        var minLastTenderDate = $("#minLastTenderDate").val();
                                        var maxLastTenderDate = $("#maxLastTenderDate").val();
                                        if (minLastTenderDate!=''){
                                            sou += "&minLastTenderDate="+minLastTenderDate;
                                        }
                                        if (maxLastTenderDate!=''){
                                            sou += "&maxLastTenderDate="+maxLastTenderDate;
                                        }
//                     					var maxMoney = $("#maxMoney").val();
//                     					if(maxMoney!=""){
//                     						sou += "&maxMoney="+maxMoney;
//                     					}
                    					

                    					var minTenderCount = $("#minTenderCount").val();
                    					if(minTenderCount!=""){
                    						sou += "&minTenderCount="+minTenderCount;
                    					}
                    					
                    					
                    					var maxTenderCount = $("#maxTenderCount").val();
                    					if(maxTenderCount!=""){
                    						sou += "&maxTenderCount="+maxTenderCount;
                    					}
                    					
                    					var minSumMoney = $("#minSumMoney").val();
                    					if(minSumMoney!=""){
                    						sou += "&minSumMoney="+minSumMoney;
                    					}
                    					
                    					
                    					var maxSumMoney = $("#maxSumMoney").val();
                    					if(maxSumMoney!=""){
                    						sou += "&maxSumMoney="+maxSumMoney;
                    					}
                    					
                                        if (sou!=""){
                                            location.href=url+sou;
                                        }
                                    }
                                    
                                    
                                    
                                    
                                   function exportxls(){	
                                    time();
								   var num='${(page.total)?c}'; 
				num=num.replace(",",""); 
				if(num>30000){ //条数自己定义，但必须小于65536 
					alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。 
					return false; 
				}
                    					var sou = "";
                    					var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                    	var realname = $("#realname").val();
                    					if(realname!=""&&realname!="请输入真实姓名"){
                    						sou += "&realname="+realname;
                    					}
                    					// var minMoney = $("#minMoney").val();
                    					// if(minMoney!=""){
                    					// 	sou += "&minMoney="+minMoney;
                    					// }
                    					
                      					var phone = $("#phone").val();
                      					if(phone!=""&&phone!="请输入手机号码"){
                    						sou += "&phone="+phone;
                    					}
                   					  	var minRegisterDate = $("#minRegisterDate").val();
                                        var maxRegisterDate = $("#maxRegisterDate").val();
                                        if (minRegisterDate!=''){
                                            sou += "&minRegisterDate="+minRegisterDate;
                                        }
                                        if (maxRegisterDate!=''){
                                            sou += "&maxRegisterDate="+maxRegisterDate;
                                        }
                                        var minFirstTenderDate = $("#minFirstTenderDate").val();
                                        var maxFirstTenderDate = $("#maxFirstTenderDate").val();
                                        if (minFirstTenderDate!=''){
                                            sou += "&minFirstTenderDate="+minFirstTenderDate;
                                        }
                                        if (maxFirstTenderDate!=''){
                                            sou += "&maxFirstTenderDate="+maxFirstTenderDate;
                                        }
                                        var minLastTenderDate = $("#minLastTenderDate").val();
                                        var maxLastTenderDate = $("#maxLastTenderDate").val();
                                        if (minLastTenderDate!=''){
                                            sou += "&minLastTenderDate="+minLastTenderDate;
                                        }
                                        if (maxLastTenderDate!=''){
                                            sou += "&maxLastTenderDate="+maxLastTenderDate;
                                        }    					
                    					// var maxMoney = $("#maxMoney").val();
                    					// if(maxMoney!=""){
                    					// 	sou += "&maxMoney="+maxMoney;
                    					// }
                    					

                    					var minTenderCount = $("#minTenderCount").val();
                    					if(minTenderCount!=""){
                    						sou += "&minTenderCount="+minTenderCount;
                    					}
                    					
                    					
                    					var maxTenderCount = $("#maxTenderCount").val();
                    					if(maxTenderCount!=""){
                    						sou += "&maxTenderCount="+maxTenderCount;
                    					}
                    					
                    					var minSumMoney = $("#minSumMoney").val();
                    					if(minSumMoney!=""){
                    						sou += "&minSumMoney="+minSumMoney;
                    					}
                    					
                    					
                    					var maxSumMoney = $("#maxSumMoney").val();
                    					if(maxSumMoney!=""){
                    						sou += "&maxSumMoney="+maxSumMoney;
                    					}
                                     
                                      if (sou!=""){
                                          location.href=xlsurl+sou;
                                      }else{
                                          location.href=xlsurl;
                                      }
                                    
                                    } 
                                    //秒倒计时
                                        var tmpWait = 10;                    
                                        function time() {
                                            if (tmpWait>0) {
                                                $('.export input').attr("disabled", true);
                                                $('.export input').val(tmpWait + "秒后再试");
                                                --tmpWait;
                                                setTimeout(function() {
                                                        time();
                                                    },
                                                    1000)
                                            } else {
                                                tmpWait = 10;
                                                $('.export input').removeAttr("disabled");
                                                $('.export input').val("导出列表");
                                            }
                                        }
                                    
                                    
                                    
                                    
                                    
                                </script>
                            </div>

            </div>
        </div>
        <div class="mc-b">
            <#include "../foot.html">
        </div>
    </div>
    <#include "../jsPage.html">
    </body>
</html>

